<?php
header('Content-type: application/xls');
header('Content-Disposition:attachment;filename=dsketnap.xls');
?>
	<table cellpadding="0" cellspacing="0" id='tables'>
	<tr>
			<th><?php echo 'MSSV';?></th>
			<th><?php echo 'Họ Tên';?></th>
			<th><?php echo 'Ngày Đề Nghị';?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($qdketnaps as $sinhvien):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
		$id = $sinhvien['Qdketnap']['id'];
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $sinhvien['Sinhvien']['mssv']; ?>&nbsp;</td>
		<td><?php echo $sinhvien['Sinhvien']['hoten']; ?>&nbsp;</td>
		<td><?php echo empty($sinhvien['Ketnapdv']['ngayketnap'])?'':date('d-m-Y',strtotime($sinhvien['Ketnapdv']['ngayketnap'])); ?>&nbsp;</td>
	</tr>
<?php endforeach; ?>
	</table>